- Visualization of 2 dimensional data -
( 1)>u=cos(dincarr(10,15)/20.); ( 2)>v=transpose(sin(dincarr(15,10)/20.)); ( 3)>q=abs(u)+abs(v); q=q/max(q)*120; ( 4)>window(0,\bpp=7); ( 5)>plot(\xrange={0,14},\yrange={0,9},\title="Image of Field Strength",\ ( 6)>\position={0.01,0.01,0.7,0.5},\titleheight=0.05); ( 6)>show(q,\linear,\position={-0.5,-0.5}); ( 7)>loadct(redmap(120)/1.5+80); Function redmap defined ( 8)>contour(q,\nlevels=7,\curve); ( 9)> ( 10)>/* now resize the image with the mouse */ ( 11)> ( 12)>image_scale(0,120,\ticks={0,20,40,60,80,100,120}, \ ( 13)>\title="Field Strength",\position={0.75,0.04,0.95,0.46}); Function image_scale defined ( 14)>plot(\xrange={0,14},\yrange={0,9},\num=2,\title="Velocity Field",\ ( 15)>\position={0.01,0.51,0.95,0.99}); ( 16)>velocity_field(u,v,\nsteps=10,\stepSize=0.05,\curve,\noaxis);